

<cfswitch expression="#action#"> 

<cfcase value="clear_cart">
	
</cfcase>

<cfcase value="cart_pdf">
<cfinvoke component="components.data" method="get_report_data" returnvariable="list_reports" id="#id#">

<cfset result_message = ''>
	<cfset result_message = '{"reports":['>
	
	<cfloop list="#list_reports.poc_id#" index="i">
<cfquery name="selections" datasource="#session.dsn#" >
select * from poc_detail where poc_id = #i#
</cfquery>
		<cfset result_message =  result_message & '{"poc_id":"' & Session.helpers.add_json_escapement(selections.poc_id) & '","first_name":"' & Session.helpers.add_json_escapement(selections.first_name) & '","last_name":"' & Session.helpers.add_json_escapement(selections.last_name) &  '","email":"' & Session.helpers.add_json_escapement(selections.email) &  '"},'>
	</cfloop>
	<cfset result_message = Session.helpers.remove_comma_from_end_of_string(result_message)>
	<cfset result_message = result_message & ']}'>

	<cfoutput>#result_message#</cfoutput>
	
</cfcase>


</cfswitch>